<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<jsp:include page = "../metadatos.jsp" flush = "True" />
<html>
    <head>
        <title>Administrador de Pedidos</title>
    </head>
    <body>
        <div class="wrapper">
            <header class="header">
                <img src="./resources/Logo.PNG" />
            </header><!-- .header-->
            <!-- .Navigation Menu -->
            <jsp:include page = "../menuNavegacion.jsp" flush = "True" />
            <main class="content">
                <!-- .content -->
                <form method="post" action="AlmacenJSP?action=filtroPedidosAlmacen" class="formee">
                    <input type="hidden" name="idVendedor" value=""/>
                    <fieldset>
                        <legend>Filtro</legend>
                        <div class="grid-6-12">
                            <label>ID Cliente</label>
                            <input type="text" name="idCliente" onKeyup="this.value = ventero(this.value)"/>
                        </div>
                        <div class="grid-6-12">
                            <label>ID Pedido</label>
                            <input type="text" name="idPedido" onKeyup="this.value = ventero(this.value)"/>
                        </div>
                        <div class="grid-3-12">
                            <input type="submit" value="Filtrar" />
                        </div>
                    </fieldset>
                </form>
                <form class="formee">
                    <div class="grid-12-12">
                        <table class="bordered" width="100%">
                            <thead>
                                <tr style="font-size:19px;">
                                    <th>Id Vendedor</th>
                                    <th>Id Pedido</th>
                                    <th>Id Cliente</th>
                                    <th>Fecha de Creacion</th>
                                    <th>Hora de Creacion</th>
                                    <th>Ver Detalles </th>
                                </tr>
                            </thead>
                            <c:forEach items="${tarryPrincipal.pedidos}" var="p">
                                <tr style=" font-size:19px;">
                                    <td><c:out value="${p.idVendedor}"/></td> 
                                    <td><c:out value="${p.idPedidido}"/></td> 
                                    <td><c:out value="${p.idCliente}"/></td> 
                                    <td><c:out value="${p.fechaCreacion}"/></td> 
                                    <td><c:out value="${p.horaCreacion}"/></td> 
                                    <td>
                                        <div align="center">
                                            <img src="./resources/lupa.jpg" height="36" width="36"  
                                                 onclick="location.href = './Almacen?action=detallesPedido&idPedido=<c:out value="${p.idPedidido}"/>&idCliente=<c:out value="${p.idCliente}"/>'" />
                                        </div>
                                    </td> 
                                </tr>
                            </c:forEach>
                        </table>
                    </div>
                </form>
            </main>
        </div>
    </body>
</html>
<jsp:include page = "../pie.jsp" flush = "True" />
